#pragma once
#include"UIUtilities.h"
#include"UIInputManager.h"

BEGIN_NAMESPACE(ui_manager)
BEGIN_NAMESPACE(ui_events)

class UIEvent
{
private:
	unsigned short flag_;
	int msg_;
	int auxInfo_;
	bool handled_;
public:
	enum{FLAG_RENDER, FLAG_MOUSE, FLAG_KEYBOARD, FLAG_TICK};
//=====================================
// Constructors, Destructor, Operators
//=====================================
	UIEvent();
	UIEvent(unsigned short UIMSG_FLAG_);
//=====================================
// Functionality
//=====================================

//=====================================
// Setters
//=====================================

	void setMsgFlag(unsigned short flag);
	void setMouseMsg(int x, int y, int ax, int ay, unsigned short flag, unsigned short button);
	void setKeyboardMsg(unsigned short flag,unsigned short key);
	void setRenderMsg(unsigned int parentX,unsigned int parentY,bool render);
	void setTickMsg(bool ticked, int interval, int ms);
	void setHandled(bool handled);
//=====================================
// Getters
//=====================================

	unsigned short getMsgFlag()const;
	bool getRender();
	UIPoint getRenderParentPosition();
	bool getHandled()const;
	unsigned short getMouseButton();
	unsigned short getMouseButtonState();
	UIPoint getMousePosition(bool absolute);
	unsigned short getKeyboardKey();
	unsigned short getKeyboardKeyState();
	bool getTickState();
	int getTickInterval();
	int getTickTime();
};

END_NAMESPACE
END_NAMESPACE